###########################################################################
# $Id: conceptBlockItem.p 38 2009-06-24 14:32:27Z donbeave $
###########################################################################

@CLASS
conceptBlockItem

@USE
concept/models/conceptBaseItem.p

@BASE
conceptBaseItem

@OPTIONS
locals

#----- Constructor -----

@create[hshData;hshOptions]
  ^cleanMethodArgument[hshOptions]

  ^if(!def $hshOptions.classify){
    $hshOptions.classify[Blocks]
  }

  ^BASE:create[$hshData;$hshOptions]

#----- Public -----

@factory[hshData;hshOptions]
  $result[^conceptBlockItem::create[$hshData;$hshOptions]]

@hasData[]
  $result($IsNotEmpty)

@hasChildren[]
  $result(^childrenCount.bool(false))

#----- Properties -----

@GET_dataType[]
  $result[^STORAGE.getDataTypeByID(^DataTypeID.int(0))]

#----- Private -----

@_addField_Params[strName;altBody;strType]
  $xParams[^xdoc::create{
    <params>
      $altBody
    </params>
  }]

  ^_addField_DEFAULT[$strName;$xParams;$strType]